
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script type="text/javascript">
   window.onload=function(){
	   var account=document.getElementById('accout');
	   var password=document.getElementById('password');
	   var obutt=document.getElementById('obutt');
	   var aaa=document.getElementsByClassName('aaa');
	  
	   obutt.onclick=function(){
		   if(account.value.length<11&&account.value.length!=0){
				aaa[0].innerHTML='账号不得小于11位！';
			}else if(account.value.length >= 11){
					aaa[0].innerText = '';
					}
			if(password.value.length<8&&password.value.length!=0){
				
				aaa[1].innerHTML='密码不得小于8位！';
			}
			else if(password.value.length >= 8){
					aaa[1].innerText = '';
					}
	

			var qqq;
			for(var i=0;i<users.length;i++){
				if(users[i].account == account.value && users[i].password == password.value){
					qqq=true;
					break;
					}else{
						qqq = false;
						}
				
				
				}
				if(qqq == true){
					alert('正确');
					}else{
						alert('错误');
						}
		   }
	   }
</script>
<link href="css/register.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/register-1.js"></script>
</head>

<body>
<div class="box">

<div><span class="name">用户名:</span></div>
<div><input id="accout" type="text" value=""  /><span class="aaa"></span></div>
<div><span class="pass">密　码:</span></div>
<div><input id="password" type="text" value=""  /><span class="aaa"></span></div>
<div class="butt"><input id="obutt" name="" type="button" value="登　录"></div>

</div>
</body>
</html>
